<template>
  <div class="home">
    <van-search
      v-model="value"
      shape="round"
      background="#4fc08d"
      placeholder="请输入搜索关键词"
    />
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    <ul class="listArea">
      <li v-for="item in homeData" :key="item.id">
        <div class="leftBox">
          <div class="word">{{item.title}}</div>
          <div class="word2">{{item.target.desc}}</div>
          <div class="word3">{{item.target.author.name}}</div>
        </div>
        <div class="rightBox">
          <img :src="item.target.author.avatar" alt="" />
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
// import bottom from '../components/bottonArea.vue'
// export default {
//   components: { bottom }
// }
import homeData from '../assets/data/homeData.json'
export default {
  data () {
    return {
      homeData: homeData.recommend_feeds
    }
  }
}
console.log(homeData.recommend_feeds)
</script>

<style scoped lang="scss">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
  font-size: 60px;;
  margin-top: 100px;;

}
.van-search{
  position: fixed;
  width: 100%;;
  z-index: 3;
}
.listArea{
  margin-top: 00px;;
  padding-bottom: 100px;;
}
li {
  width: 100%;
  height: 320px;
  margin-top: 10px;
  border-top: 1px solid grey;
  border-bottom: 1px solid grey;

}
.leftBox {
  float: left;
  width: 500px;
  height: 100%;
}
.rightBox {
  float: right;
  width: 250px;
  height: 100%;
  img {
    width: 150px;
    height: 150px;
    margin-top: 70px;
  }
}
.word {
  font-size: 50px;
  text-align: left;
  font-weight: bold;
  margin-top: 20px;;
}
.word2 {
  font-size: 30px;
  text-align: left;
  margin-top: 20px;
}
.word3 {
  font-size: 25px;
  text-align: left;
  margin-top: 25px;;
  color: grey;
}
</style>
